package com.itce.arco.practicenote.day01.practice2;

public class Teacher extends Person {
    double salary;
    public Teacher () {
        System.out.println("teacher的无参构造执行了");
    }
    public Teacher (String name, int age, double salary) {
        super(name, age);
        this.salary = salary;
        System.out.println("teacher的有参构造执行了");
    }
    public double getSalary () {
        return this.salary;
    }
    public void setSalary(double salary) {
        this.salary = salary;
    }
    public void show () {
        super.show();
        System.out.println("年薪：" + this.salary);
    }
}
